import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:loxen/routes/routes.dart';
import 'package:loxen/utils/string_res.dart';
import 'package:loxen/widget/my_subassembly.dart';

class AboutUsWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: PreferredSize(
        preferredSize: Size(double.infinity, 95.h),
        child: Container(
          color: Theme.of(context).backgroundColor,
          child: SafeArea(
            child: Column(
              children: <Widget>[
                Row(
                  children: <Widget>[
                    MySubassembly.getBackIcon(context,
                        color: Theme.of(context).textTheme.subtitle2.color),
                    Expanded(
                      child: Center(
                        child: Text(
                          StringResources.guan_yu_wo_men,
                          style: TextStyle(
                              fontSize: 32.sp,
                              fontWeight: FontWeight.w500,
                              color:
                                  Theme.of(context).textTheme.subtitle2.color),
                        ),
                      ),
                    ),
                    MySubassembly.getSearchIcon(null, text: Text('')),
                  ],
                )
              ],
            ),
          ),
        ),
      ),
      body: Container(
          decoration: BoxDecoration(
            border: Border(top: BorderSide(
                width: 1.h,
                color: Color(0xFFEBECF1)
            )),
            color: Theme.of(context).backgroundColor,
          ),
          padding: const EdgeInsets.fromLTRB(17, 30, 17, 30),
          child: Column(
            children: <Widget>[
              Expanded(
                child: ListView(
                  physics: BouncingScrollPhysics(),
                  children: <Widget>[
                    Text(
                      '关于LOXEN APP - 分享平台',
                      textAlign: TextAlign.center,
                      style: TextStyle(
                          color: Theme.of(context).textTheme.subtitle2.color,
                          fontSize: 32.sp,
                          fontWeight: FontWeight.w600),
                    ),
                    Container(
                      margin: const EdgeInsets.only(top: 18, bottom: 20),
                      height: 25,
                      width: 25,
                      child: Image.asset('images/mine_logo.png',
                          width: 25, height: 25),
                    ),
                    Text(
                      '   如果您是内容的生产者，请在附上作品文件或相关地址后，提供个人信息及原创证明，我们可以对您个人，个人主页、公众号等在LOXEN平台提供一定程度的曝光。',
                      style: TextStyle(
                        color: Theme.of(context).textTheme.subtitle2.color,
                        fontSize: 28.sp,
                      ),
                    )
                  ],
                ),
              ),
              GestureDetector(
                onTap: () {
                  Navigator.of(context).pushNamed(Routes.policy);
//                  showDialog(
//                      context: context,
//                      builder: (_) => PolicyDialog(
//                            showButton: false,
//                          ));
                },
                child: Container(
                  decoration: BoxDecoration(
                      border: Border(
                          bottom: BorderSide(
                              width: 1,
                              style: BorderStyle.solid,
                              color: Color(0xFF0CABCB)))),
                  child: Text(
                    '隐私政策',
                    style: TextStyle(fontSize: 26.sp, color: Color(0xFF0CABCB)),
                  ),
                ),
              )
            ],
          )),
    );
  }
}
